#include<stdio.h>

typedef struct stu
{
    int ID;
    int x;//学业成绩
    int y;//素质拓展成绩
    double gpa;//综合分数
}STU;

int main()
{
    int n;
    scanf("%d", &n);
    STU a[1000];
    for(int i = 0; i < n; i ++)
    {
        scanf("%d %d %d", &a[i].ID, &a[i].x, &a[i].y);
        a[i].gpa = a[i].x * 7 + a[i].y * 3;
    }
    for(int i = 0; i < n; i ++)
    {
        if(a[i].x + a[i].y > 140 && a[i].gpa >= 800)
            printf("Excellent\n");
        else printf("Not excellent\n");
    }
    return 0;
}